<!doctype html>
<html lang="en-us">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>CSS Solutions: How to center an element</title>
    <link rel="stylesheet" href="styles.css" />
    <style>
      .box {
        background-color: rgb(69 164 181);
        border-radius: 5px;
        padding: 10px;
        width: 100px;
        color: #fff;
      }
    </style>

    <style class="editable">
      .wrapper {
        height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    </style>
  </head>

  <body>
    <section class="preview">
      <div class="wrapper">
        <div class="box">center me!</div>
      </div>
    </section>

    <textarea class="playable playable-css" style="height: 120px">
.wrapper {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}</textarea
    >

    <textarea class="playable playable-html" style="height: 100px">
<div class="wrapper">
  <div class="box">center me!</div>
</div></textarea
    >

    <!-- leave everything below here alone -->
    <div class="playable-buttons">
      <input id="reset" type="button" value="Reset" />
    </div>
  </body>
  <script src="playable.js"></script>
</html>
